<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>


    <script>
        /* 深拷贝 */
        let arr = ['java', 'c#']
        let person = {
            name:'zzz',
            language:arr
        }
        // 通过 JSON 和字符串的转换形成一个新的对象
        let person2 = JSON.parse(JSON.stringify(person))
        person2.name = 'bbb'
        console.log(person.name)
        console.log(person2.name)
    </script>
</head>

<body>
    
</body>
</html>